package com.example.project.common.tools;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: Jerry.Zhang
 * @date: 2022/3/18 10:52
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class R<T> {
    private String code;
    private String message;
    private T data;

    public R(ResponseEnum responseEnum, T data) {
        this.code = responseEnum.getCode();
        this.message = responseEnum.getMessage();
        this.data = data;
    }

}